package demo3;

public  class Machine  implements Running,Swimming ,Fly{

    String name1;

    public Machine(String s) {
        this.name1=s;
    }

    public void running(){
       System.out.println(this.name1+"正在操场上奔跑------");
   }

    @Override
    public void swimming() {
        System.out.println(this.name1+"正在水里游泳------");
    }


    public void electricity() {
        System.out.println(this.name1+"正在充电------");
    }

    @Override
    public void fly() {
        System.out.println(this.name1+"正在飞------");
    }
}
